package com.frxuexi.base.db

import androidx.lifecycle.LiveData
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import com.frxuexi.base.entity.ParkListItem
import kotlinx.coroutines.flow.Flow

@Dao
interface ParkDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun addPark(parkListItem: ParkListItem):Long

    @Query("select * from parklistitem")
    fun getParks():List<ParkListItem>

    @Update
    fun updatePark(parkListItem: ParkListItem):Int
}